*****************************************************************************
* This code produces results from secondary analysis of legislative votes in 
* German Reichstag (Table 3)
* Michael Becher (michael.becher@ie.edu); March 13, 2025
****************************************************************************


*log using an_Reichstag_log, replace

use Reichstag, clear
eststo clear
eststo:  regress prvote_yes tariff1902_yes, robust
eststo:  regress prvote_yes tariff1902_yes pop1890log landgini1895 skill_ratio religfrac1890  , robust
eststo:  regress prvote_yes tariff1902_yes pop1890log landgini1895 skill_ratio religfrac1890 i.region, robust
esttab using "output/table3.tex", label r2 dep nocons replace ///
	keep(tariff1902_yes) ///
	cells(b(star fmt(%15.2fc)) se(par fmt(%15.2fc))) ///
	star(* 0.05) ///
		stats(r2  N, fmt( %6.2f  %15.0fc ) layout(@ @ @ @ @) ///
	labels("R$^2$"  "Observations")) ///
	collabels(none) mlabels("OLS" "OLS" "OLS") ///
	mgroups("Legislative vote on electoral reform" , pattern(1 0 0 0) ///
	prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))

**look at absences (fn. 11)
gen prvote_abs = 0
replace prvote_abs = 1 if prvote_yes == .
regress prvote_abs tariff1902_yes, robust
regress prvote_abs tariff1902_yes pop1890log landgini1895 skill_ratio religfrac1890 i.region, robust

*log close
